﻿using System;
using System.Collections.Generic;
using System.Text;
using VietKinsNutrition.Data;
using System.Windows.Forms;
using System.Data;

namespace VietKinsNutrition.Bussiness
{
    public class ClsTblTreBLL : ClsBindingBLL
    {
        ClsTblLophocDAL ClsTblLophocdal = new ClsTblLophocDAL();
        public void Bind_LophocCbo(ComboBox Cbo, int NamhocID)
        {
            Cbo.ValueMember = "Id";
            Cbo.DisplayMember = "Tenlop";
            DataTable Tbl = new DataTable();
            Tbl = ClsTblLophocdal.GetAll(NamhocID);
            DataRow Rw = Tbl.NewRow();
            Rw["STT"] = "0";
            Rw["Id"] = "-1";
            Rw["Tenlop"] = "Tất cả";
            Tbl.Rows.InsertAt(Rw, 0);
            Cbo.DataSource = Tbl;
        }
    }
}
